package com.powersystem.demo.controller;


import com.powersystem.demo.entity.PsLineInfo;
import com.powersystem.demo.mapper.PsLineInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author linrongji
 * @since 2019-11-14
 */
@RestController
public class PsLineInfoController {
    @Autowired
    private PsLineInfoMapper psLineInfoMapper;

    @RequestMapping("addPsLineInfo")
    public int addPsLineInfo(PsLineInfo pfr){
        return psLineInfoMapper.insert(pfr);
    }

    @RequestMapping("delePsLineInfo")
    public int delePsLineInfo(int id){

        return psLineInfoMapper.deleteById(id);
    }
    @RequestMapping("upPsLineInfo")
    public int upPsLineInfo(PsLineInfo pfr){
        return psLineInfoMapper.updateById(pfr);
    }

    @RequestMapping("PsLineInfoById")
    public PsLineInfo PsLineInfoById(int id) {

        return psLineInfoMapper.selectById(id);
    }
}

